package com.lris.controller;

import com.lris.dto.AddUserFriendDto;
import com.lris.dto.UsernameLoginDto;
import com.lris.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequiredArgsConstructor
@Slf4j
@Tag(name = "测试模块")
@RequestMapping("/lris")
public class Hi {

    @GetMapping("/get")
    @Operation(summary = "get测试")
    public Result hello(Integer page ,Integer pageSize,String userId ) {

    log.info("接收到参数"+page+pageSize+userId);
            return Result.success("get");
    }

    @PostMapping("/post")
    @Operation(summary = "post测试")
    public Result hi(@RequestBody UsernameLoginDto usernameLoginDto) {
        log.info("登录接口接收参数:{}", usernameLoginDto);
        log.info(usernameLoginDto.getUsername());
        return Result.success(usernameLoginDto);
    }
}
